using System.Collections.Concurrent;
using Avanzis.QueryFramework;

namespace Avanzis.QueryBuilder.Fluent
{
  
    internal class DefaultTablePluralizer : ITableNamePluralizer
    {
        private static readonly ConcurrentDictionary<string, string> TableNameCache = new ConcurrentDictionary<string, string>();

        public string Pluralize(string typeName)
        {
            return TableNameCache.GetOrAdd(typeName, typeName.MakePlural());
           
        }
    }
}